import React, {Component} from "react";
import About from "./pages/About";
import Home from "./pages/Home";
import MyNavLink from "./components/MyNavLink";
import {Route} from "react-router-dom";

export default class App extends Component {

    render() {
        return (
            <div>
                <div className="row">
                    <div className="col-xs-offset-2 col-xs-8">
                        <div className="page-header"><h2>React Router Demo</h2></div>
                    </div>
                </div>
                <div className="row">
                    <div className="col-xs-2 col-xs-offset-2">
                        <div className="list-group">
                            <MyNavLink to="/about" className="list-group-item" children="About"></MyNavLink>
                            <MyNavLink to="/home" className="list-group-item" children="Home"></MyNavLink>
                        </div>
                    </div>
                        <Route path="/about" component={About}/>
                        <Route path="/home" component={Home}/>
                </div>
            </div>




        )
    }
}